package cn.sdhuijin.vms.dao;

import java.util.Collection;
import java.util.Date;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import cn.sdhuijin.vms.model.CarRecord;

public interface ICarRecordDao extends JpaRepository<CarRecord, Long> {
	public Page<CarRecord> findByOrganizationIdIn(Collection<Long> orgIds,
			Pageable pageable);

	public Page<CarRecord> findByDateBetweenAndCarLicenseLike(Date startTime,
			Date endTime, String license, Pageable pageable);

	public List<CarRecord> findByDateBetweenAndCarLicenseLike(Date startTime,
			Date endTime, String license);

	public List<CarRecord> findByCarOrganizationIdInAndDateBetweenAndCarLicenseLike(
			Collection<Long> orgIds, Date startTime, Date endTime,
			String license);

	public Page<CarRecord> findByCarOrganizationIdInAndDateBetweenAndCarLicenseLike(
			Collection<Long> orgIds, Date startTime, Date endTime,
			String license, Pageable pageable);
}
